<?php include "lang.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?php include "import.php"; ?>
        <script type="text/javascript">
        	$(document).ready(function() {
        		$("#form").validate({
    				rules: {
    					receiver: { required: true },
    					phone: { required: true }
    				},
    					
    				messages: {
    					receiver: "<?php echo $langs["validation"]; ?>",
    					phone: "<?php echo $langs["validation"]; ?>"
    				}
    			});

    			if (window.location.search) {
        			$("#msgDialog").dialog({ 
        				dialogClass: 'no-close',
        	            modal: true,
        	            width: '210px',
        	            position: 'center'});
        			setTimeout(function() {
        				$("#msgDialog").dialog("close");
        				$.post("../action/ReleaseCartAction.php");
        				window.location.href = "index.php";
        			},2000);
    			}
            });
            
        </script>
        <title>Gia An</title>
    </head>
<body>
	<form id="form" method="post">
		<?php include("floating-panel.php"); ?>
		<div class="wrapper">

		<?php include("header.php"); ?>
			<div class="main_body">

			<?php include("left_menu.php");?>
				<div class="main_content">
					<div class="main_content_header"><?php echo $langs['home.order']?></div>
					<table class="order_form">
						<tr>
							<th><?php echo $langs['order.receiver']?>(*)</th>
							<td><input type="text" name="receiver" id="receiver" /></td>
						</tr>
						<tr>
							<th><?php echo $langs['order.phone']?>(*)</th>
							<td><input type="text" name="phone" id="phone" /></td>
						</tr>
						<tr>
							<th><?php echo $langs['order.email']?></th>
							<td><input type="text" name="email" id="email" /></td>
						</tr>
						<tr>
							<th colspan="2" align="left"><?php echo $langs['order.note']?></th>
						</tr>
						<tr>
							<td colspan="2"><textarea name="note" id="note"></textarea></td>
						</tr>
						<tr>
							<td colspan="2"><a onclick="submitForm('form', '../action/orderProductAction.php', 'post')" class="button right" style="display:<?php echo isset($_SESSION["username"][0])==1?"block":"none"; ?>"><?php echo $langs['order.send']?></a>
							</td>
						</tr>
					</table>

				</div>
			</div>

        </div>
	</form>
	
	<div id='msgDialog' class="msgDialog_box" style="display:none;">
		<table class="msgDialog_form">
			<tr><td><?php echo $langs['order.billed']?></td></tr>
		</table>
	</div>
         <?php include("footer.php");?>
</body>
</html>
